
import React,{Component,Fragment}from "react";

class Demo extends Component {
    render () {
        return (
            <div>
                1111
            </div>
        )
    }
}

// 高阶函数
function AppWrapper (Component) {
    let old_render = Component.prototype.render
    Component.prototype.render = function () {
        return (
            <Fragment>
                 <div>装饰器头</div>
                 {old_render()}
                 <div>装饰器尾</div>
            </Fragment>
           
        )
    }
    return Component
}
export default AppWrapper(Demo)